package com.hsc.test;

import com.hsc.box.LinkedBox;

public class LinkedMain {
    public static void main(String[] args) {
        LinkedBox<Integer> linkedBox=new LinkedBox();
        //添加元素
        for (int i = 0; i < 10; i++) {
            linkedBox.add(i);
        }
        System.out.println("容器数量个数："+linkedBox.size());
        //获取第三个元素 index 索引下标
        int i = linkedBox.get(2);
        System.out.println(i);
        //删除元素
        int oldValue = linkedBox.remove(2);
        System.out.println(oldValue);
        System.out.println("删除一个元素："+oldValue);
        System.out.println(linkedBox.get(2));
        System.out.println("容器数量个数："+linkedBox.size());
    }
}
